<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:cc="http://java.sun.com/jsf/composite"
	xmlns:p="http://primefaces.prime.com.tr/ui"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:c="http://java.sun.com/jstl/core">

<cc:interface>
	<cc:attribute name="titulo"></cc:attribute>
	<cc:attribute name="colunas" required="true"></cc:attribute>
	<cc:attribute name="value" required="true"></cc:attribute>	
</cc:interface>
<cc:implementation>
	<p:dataTable value="#{cc.attrs.value}" var="var">
		<f:facet name="header">
			<h:outputLabel value="#{cc.attrs.titulo}" />
		</f:facet>
		<p:columns value="#{cc.attrs.colunas}" var="column"
			columnIndexVar="colIndex">
			<f:facet name="header">  
                #{column.header}  
            </f:facet>    
            #{var[column.property]}  
        </p:columns>
	</p:dataTable>


</cc:implementation>
</html>